import type { Application } from 'egg'

export default (app: Application) => {
  const { router, controller } = app

  /* menu */
  router.get('/menu', controller.menu.list)
  router.get('/menu/findOne', controller.menu.findOne)
  router.post('/menu', controller.menu.create)
  router.put('/menu', controller.menu.update)
  router.delete('/menu', controller.menu.destroy)

  /* table */
  router.get('/table', controller.table.list)
}